build: fix clean to remove all *.o and .*.d files
authorJonathan Creekmore <jonathan.creekmore@gmail.com>
Thu, 3 Dec 2015 14:35:09 +0000 (15:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 3 Dec 2015 14:35:09 +0000 (15:35 +0100)
commit68dc5813545c408b57221a2cb81b7e00dc9dc630
tree990090ae3652c631086768231a317e70533f2fe9
parent7a5223f62d3adccd95877d50bf70306b4594df72
build: fix clean to remove all *.o and .*.d files

In commit 8b6ef9c152edceabecc7f90c811cd538a7b7a110, several files in
xen/common/compat were changed to be built using the Makefile in
xen/common, by appending the compat prefix to the object
files. Additionally, the xen/common/compat directory was removed from
the subdirs-y variable, so it is no longer visited by the clean
rule. This resulted in some object files and dependency files being
generated by inclusion into obj-y, but not cleaned because they lived in a
directory that was unvisited by the clean rules.

Since there is a desire for all of the object files and dependency files
to be cleaned, just search for all objects and dependency files and
delete them on clean. The previous method of only tracking with the
$(DEPS) and *.o in the clean rules had the disadvantage that, if the
configuration changed between a build and a clean, some of the
dependencies or objects could get left behind. This method does not have
the same disadvantage.

Signed-off-by: Jonathan Creekmore <jonathan.creekmore@gmail.com>
[dropped removal of *.o and $(DEPS) from xen/Rules.mk's clean rule]
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/Makefile